package com.sample.mapping;

import javax.persistence.Column;


public class Caption<T> extends AbstractMapping<T> {
	
	@Column(name="user_id")
	private T userId;
	
	@Column(name="post_id")
	private T postId;
    
	@Column(name="pixel")
	private String pixel;
			
	@Column(name="caption_no")
	private String captionNum;
	
	@Column(name="bubble_type")
	private String bubbleType;
	
	@Column(name="bubble_decoration")
	private String bubbleDeco;
	
	@Column(name="body")
	private String body;

	public T getUserId() {
		return userId;
	}

	public void setUserId(T userId) {
		this.userId = userId;
	}

	public T getPostId() {
		return postId;
	}

	public void setPostId(T postId) {
		this.postId = postId;
	}


	public String getPixel() {
		return pixel;
	}

	public void setPixel(String pixel) {
		this.pixel = pixel;
	}

	public String getCaptionNum() {
		return captionNum;
	}

	public void setCaptionNum(String captionNum) {
		this.captionNum = captionNum;
	}

	public String getBubbleType() {
		return bubbleType;
	}

	public void setBubbleType(String bubbleType) {
		this.bubbleType = bubbleType;
	}

	public String getBubbleDeco() {
		return bubbleDeco;
	}

	public void setBubbleDeco(String bubbleDeco) {
		this.bubbleDeco = bubbleDeco;
	}

	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}
		
	@Override
	public int hashCode() {
		return getId().hashCode();
	}

	public boolean equals(Caption<T> caption) {
		if (this.getId() != caption.getId()) {
			return false;
		}
		return this.getId().equals(caption.getId());
	}
}
